<!-- 文件名：order_list.html -->
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head><title>订单列表</title></head>
<body>
<h2>订单列表</h2>

<table border="1px">
  <tr><th>订单总价</th><th>商品列表</th></tr>
  <tr th:each="order : ${orders}">
    <td th:text="${order.totalPrice}">总价</td>
    <td>
      <table border="1px">
        <tr><th>商品名</th></tr>
        <tr th:each="product : ${order.products}">
          <td th:text="${product.name}"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>

<a href="/products" th:href="@{'/products?username=' + ${user.username} }">返回商品列表</a>
</body>
</html>
